import React from 'react';
import {component} from "../../_internal";
import Op from './Op';
import Ux from "ux";
import {Input, List} from "antd";
import Jsx from './Web';
import './Cab.less';

/*
 * 按 部门/组 筛选经理
 * 1）内部选人使用 UserSelector
 * 2）穿透调用 rxSelected 方法，UserSelector 回调使用
 */
@component({
    "i18n.cab": require('./Cab.json'),
    "i18n.name": "UI",
})
class Component extends React.PureComponent {
    componentDidMount() {
        Op.componentInit(this);
    }

    render() {
        return Ux.xtReady(this, () => {
            const {$rows = []} = this.state;
            return (
                <Input.Group className={"web-user-leader"}>
                    <List dataSource={$rows}
                          renderItem={(item) => Jsx.renderItem(this, item)}/>
                </Input.Group>
            )
        }, {name: "UserLeader", logger: true})
    }
}

export default Component